package service.impl;

import bean.Users;
import dao.impl.UsersDaoImpl;
import service.UsersService;

import java.util.List;

public class UsersServiceImpl implements UsersService {
    private UsersDaoImpl usersDao = new UsersDaoImpl();
    @Override
    public List<Users> getAllUsers() {
        return usersDao.getAllUsers();
    }

    @Override
    public Users getUser(Integer id) {
        return usersDao.getUser(id);
    }

    @Override
    public boolean updateUser(String username,String password){
        return usersDao.updateUser(username,password);
    }

    @Override
    public Users login(String username, String password) {
        return usersDao.login(username,password);
    }

    @Override
    public boolean getUser(String username) {
        return usersDao.getUser(username);
    }
}
